<section>
    <div ng-if="!isImg">
        <div class="input-group">
            <input type="file" class="form-control hidden" data-ng-model="fileModel" readonly>
            <span class="input-group-btn">
            <button class="btn btn-default" type="button"
                    onclick="$(this).parent().prev().click()"
                    data-ng-disabled="fileLength !=-1&&fileModel.files.length>=fileLength">{{btnName}}</button>
            </span>
        </div>

        <div ng-repeat="file in fileModel.files">{{file.filename}}
            <i class="fa fa-times-circle-o m-l-sm pointer text-danger" ng-click="delFile(file.id)" ng-if="isEdit"></i>
        </div>
    </div>

    <div class="input-group" ng-if="isImg">
        <div class="thumbnail pull-left m-r-xs m-b-xs pos-rlt" ng-class="{'rounded':isCircle}" ng-repeat="file in fileModel.files">
            <i class="fa fa-minus-circle del-upload-img-ico" data-ng-click="delFile($index)" ng-if="isEdit"></i>
            <img data-ng-src="{{getFile(file.id)}}"
                 ng-style="{'width': width,'height': height}"
                 ng-class="{'rounded':isCircle}"/>
        </div>

        <input type="file" class="form-control hidden" data-ng-model="fileModel" readonly>

        <div class="thumbnail pull-left m-r-xs m-b-xs pos-rlt" ng-class="{'rounded':isCircle}" data-ng-if="fileModel.files.length < fileLength">
            <i class="fa add-upload-img-ico"
               onclick="$(this).parent().prev().click()"
               ng-style="{'width': width,'height': height}"></i>
        </div>
    </div>
</section>